package A_java语言的新特性.d.重复注解.自定义注解;

/**
 * Created by zc on 2017/3/10.
 */
public class Apple {

    @FruitName("apple")
    private String appleName;

    @FruitColor(fruitColor = FruitColor.Color.RED)
    private String appleColor;


    public void displayName() {
        System.out.println("水果名字： " + this.getAppleName());
        System.out.println("水果颜色： " + appleColor);
    }


    public String getAppleName() {
        return appleName;
    }

    public void setAppleName(String appleName) {
        this.appleName = appleName;
    }

    public String getAppleColor() {
        return appleColor;
    }

    public void setAppleColor(String appleColor) {
        this.appleColor = appleColor;
    }

    public static void main(String[] args) {
        Apple apple = new Apple();
        apple.displayName();
    }

}
